#ifndef COMENTS_MANAGE_H
#define COMENTS_MANAGE_H

#include <QDialog>
#include <QTableWidget>
#include <QGroupBox>
#include <QComboBox>
#include <QButtonGroup>
#include <QDateEdit>
#include <QTextEdit>
#include <QLabel>
#include <QSqlDatabase>

namespace Ui {
class Coments_manage;
}

class Coments_manage : public QDialog
{
    Q_OBJECT

public:
    explicit Coments_manage(QSqlDatabase db, QWidget *parent = nullptr);
    ~Coments_manage();

private slots:
    void applyFilters();
    void showCommentDetail();
    void submitReply();
    void resetFilters();

    void on_pushButton_clicked();

private:
    QSqlDatabase m_db;
    Ui::Coments_manage *ui;
    QString currentCommentId;
    void initUI();
    void loadSampleComments();
    void setupConnections();
    void initDatabase(); // 初始化数据库连接
    void loadCommentsFromDatabase(); // 从数据库加载评论
};

#endif // COMENTS_MANAGE_H
